import QtQuick 1.0
import com.nokia.symbian 1.0

Item {
    id: sessionTypeDelegate

    width:  sessionTypeDelegate.ListView.view.width
    height: sponsorLogo.paintedHeight + sponsorName.paintedHeight + sponsorDesc.paintedHeight
            + sponsorUrl.paintedHeight + toolBar.height

    Column {

        FontLoader {
            id: fontStyle
            name: "Courier"
        }

        Rectangle {
            id: sponsorRect

            width:  sessionTypeDelegate.width
            height: sessionTypeDelegate.height
            color:  "#ffffff"
            border.width: 1
            border.color: "black"
            smooth: true

            Image {
                id: sponsorLogo

                anchors.top: parent.top
                anchors.topMargin: 2
                width: parent.width

                source: logoUrl
                fillMode: Image.PreserveAspectFit
                smooth: true


            }

            Text {
                id: sponsorName

                anchors.top: sponsorLogo.bottom
                anchors.topMargin: 8
                width: parent.width

                text: name
                color: "black"
                font.family: fontStyle.name
                font.bold: true
                font.pixelSize: 17

                wrapMode: Text.WordWrap
            }


            Text {
                id: sponsorDesc

                anchors.top: sponsorName.bottom
                anchors.topMargin: 8
                width: parent.width

                text: desc
                color: "black"
                font.family: fontStyle.name
                font.pixelSize: 20

                wrapMode: Text.WordWrap
                onLinkActivated: Qt.openUrlExternally(link);
            }

            Text {
                id: sponsorUrl

                text: url
                visible:  false
            }

            MouseArea {
                anchors.fill: sponsorLogo

                onClicked:  {
                    Qt.openUrlExternally(sponsorUrl.text);
                }
            }


        }

    }

}
